home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / visualar.lha / VisualArts25 / VAInstall / PopUpMenuClass.h < prev    next >
C/C++ Source or Header  |  1995-08-16  |  2KB  |  97 lines

  1. #ifndef PUMG_CLASS_H
  2. #define PUMG_CLASS_H 1
  3. /** ** *** MakeRev Header *** **
  4. **
  5. **  ** PopupMenuClass - BOOPSI Popup menu. **
  6. **
  7. **  Copyright © 1993,1994 Markus Aalto
  8. **
  9. **  Creation date: 09-Dec-93
  10. **
  11. **  ------------------------------------------------------------------
  12. **  $Filename: PopUpMenuClass.h $
  13. **  $Revision: 1.1 $
  14. **  $Date: 29-Dec-93 $
  15. **
  16. **  $Author: Markus_Aalto $
  17. **  $Comment: Freely Distributable. $
  18. **
  19. */
  20.  
  21.  
  22. #include <exec/types.h>
  23. #include <exec/memory.h>
  24. #include <exec/lists.h>
  25. #include <exec/libraries.h>
  26.  
  27.  
  28. #include <graphics/gfxmacros.h>
  29. #include <graphics/regions.h>
  30.  
  31. #include <intuition/intuition.h>
  32. #include <intuition/classusr.h>
  33. #include <intuition/gadgetclass.h>
  34. #include <intuition/icclass.h>
  35. #include <intuition/imageclass.h>
  36.  
  37. #include <utility/tagitem.h>
  38.  
  39. #include <stdlib.h>
  40.  
  41. #include <proto/all.h>
  42.  
  43. extern  Class *CreatePopUpMenuClass( void );
  44. extern  BOOL DisposePopUpMenuClass( Class *cl );
  45.  
  46. #define PUMG_TAGBASE            (TAG_USER + 700)
  47.  
  48. /*  Text in Exec List. (ISG--) */
  49. #define PUMG_Labels             (PUMG_TAGBASE)
  50.  
  51. /*  Active item in Labels list. (ISGNU) */
  52. #define PUMG_Active             (PUMG_TAGBASE+1)
  53.  
  54. /*  TextFont we use for Texts. (ISG--) */
  55. #define PUMG_TextFont           (PUMG_TAGBASE+2)
  56.  
  57. /*  V39 users can use this to use NewLook menu colors. (I-G--) */
  58. #define PUMG_NewLook            (PUMG_TAGBASE+3)
  59.  
  60.  
  61. /* Predefined Minimum dimensions for safe operation. */
  62. #define PUMG_MinWidth           28
  63. #define PUMG_MinHeight          8
  64.  
  65. /*****************************************************/
  66. /* Private data, do NOT USE this outside class code. */
  67. /*****************************************************/
  68. #ifdef POPUPMENUCLASS_PRIVATE
  69.  
  70. #define PUMG_SetTagArg(tag, id, data)   {tag.ti_Tag = (ULONG)(id);\
  71.                                         tag.ti_Data = (ULONG)(data);}
  72.  
  73. typedef ULONG (*HookFunction)(void);
  74.  
  75. typedef struct {
  76.     struct  List *Labels;
  77.     UWORD   Active;
  78.     UWORD   Count;
  79.     BOOL    NewLook;
  80.  
  81.     /* For rendering. */
  82.     struct  Image *FrameImage;
  83.     struct  TextFont *Font;
  84.  
  85.     /* Temporary data for PopupMenu. */
  86.     UWORD   ItemHeight;
  87.     UWORD   FitsItems;
  88.     BOOL    ActiveFromMouse;
  89.     UWORD   Temp_Active;
  90.     struct  Window *popup_window;
  91.     struct  Rectangle rect;
  92. } PUMGData;
  93.  
  94. #endif      /* POPUPMENUCLASS_PRIVATE */
  95.  
  96. #endif      /* PUMG_CLASS_H */
  97.